<#macro header page="other">		
		<div class="home-section">
			<!--二级头部-->
			<div class="home-header">
				<div class="home-header-main clearfix">
					<!--logo-->
					<a href="index.html" class="logo fl">
						<img style="max-width: 200px;" src="http://www.wine22.com/style/default/images/logo.gif" alt="">
						<h2>营圈网</h2>
					</a>
					<!--搜索框-->
					<div class="home-search-parent fl">
						<div class="home-search clearfix">
							<form action="/ware/list.html" method="post">
								<input type="text" class="fl input" name="name" >
								<input type="submit" class="fl btn" id="search" value="搜&nbsp;索">
								<div class="gg"></div>
							</form>

						</div>
						<dl class="home-hotsearch clearfix">
							<dt class="fl">热门搜索：</dt>
							<dd class="fl">
								<a href="/ware/list.html?name=茶几">茶几</a>
							</dd>
							<dd class="fl">
								<a href="/ware/list.html?name=电饭煲">电饭煲</a>
							</dd>
							<dd class="fl">
								<a href="/ware/list.html?name=空调">空调</a>
							</dd>
							<dd class="fl">
								<a href="/ware/list.html?name=手机">手机</a>
							</dd>
							<dd class="fl">
								<a href="/ware/list.html?name=笔记本">笔记本</a>
							</dd>
						</dl>
					</div>
					
					<#if user??>
					<!--购物车-->
					<div class="home-shopping fl">
						<div class="home-shopping-top clearfix">
							<em class="fl"></em>
							<span class="fl"><a href="/cart/list.html">我的购物车</a></span>
							<i class="fl"></i>
						</div>
					
						<div class="home-individual clearfix">
							<span class="fl"></span>
							<em class="fl" id="couts">${cartTotal!0} </em>
							<i></i>
						</div>
						<dl class="home-shopping-up"">
							<#if carts?? && carts?size gt 0>
							<#list carts as item>
							<dd class="clearfix active" id="cart_${(item.wareId)!0}">
								<a href="/ware/${(item.id)!0}.html" class="fl">
									<img src="${(item.mainImage)!""}" alt="${(item.wareName)!""}-营圈网">
								</a>
								<a href="/ware/${(item.id)!0}.html" class="fl con">${(item.wareName)!""}</a>
								<strong class="fl">
                                    <span><#if item.pricePromotional??>&yen;${(item.pricePromotional)?string('0.00')}<#else>--</#if></span>x<span id="cart_num_${(item.id)!0}">${(item.number)!1}</span><br>
                                    <a href="javascript:;" class="dels" cartId="${(item.id)!0}" wareId="${(item.wareId)!0}">删除</a>
                                </strong>
							</dd>
							</#list>
							<#else>
							<dt id="cart_no">您的购物车还没东西哦，赶紧选吧。</dt>
							</#if>
						</dl>
					</div>
					</#if>
					<!--二维码
					<div class="fr home-code"></div>
					-->
				</div>
			</div>

			<!--二级导航-->
			<div class="homeNavBar">
				<div class="w clearfix" style="z-index:2;">
					<dl class="fl level  <#if page == "index">homeNavBar-index<#else>paperone</#if>">
						<dt class="clearfix">
		                    <i class="fl"></i>
		                    <span class="fl">全部商品分类</span>
		                    <em class="fl"></em>
		                </dt>
		                <#if cats?? && cats["0"]??>
						<#assign idx =1>
						<!-- 取栏目分类 -->
						<#list cats["0"] as item>
						<dd class="menu">
							<div class="clearfix">
								<i class="fl menuItemBack${item_index+1}"></i>
								<span class="fl"><a href="/ware/list/${(item.id)!0}.html">${(item.name)!""}</a></span>
								<em class="fr"></em>
							</div>
							<div class="i-mc">
								<!-- 取二级分类 -->
								<#list cats[(item.id)?string] as item2>
								<dl class="classification2 clearfix">
									<dt class="fl">
                         				<a href="/ware/list/${(item.id)!0}/${(item2.id)!0}.html">${(item2.name)!""}&nbsp;<b>&gt;</b></a>
                                   	</dt>
									<dd class="fl clearfix">
										<#list cats[(item2.id)?string] as item3>
										<a href="/ware/list/${(item.id)!0}/${(item2.id)!0}/${(item3.id)!0}.html" class="fl">${(item3.name)!""} </a>
										</#list>
									</dd>
								</dl>
								</#list>
							</div>
						</dd>
						</#list>
						</#if>
					</dl>
					<ul class="fr clearfix navitems-2016">
						<!--<li class="fl"><a href="http://127.0.0.1">首页</a></li>-->
						<li class="fl">
							<a class="active" href="/index.html">首页</a>
						</li>
						<li class="fl">
							<a href="/ware/list.html">最新促销</a>
						</li>
						<li class="fl">
							<a href="/ware/list.html">热卖商品</a>
						</li>
					</ul>
				</div>
			</div>

			<!--ajax删除购物车里面的商品-->
			<script>
				$('.dels').click(function(){
					delCart($(this).attr('wareId'));
				});
				function companyNum (wareId) {
					// 重新计算 
					$("#cart_" + wareId).remove();
					$('#couts').html(parseInt($('#couts').html()) - 1);
				}
				// 删除购物车
				function delCart(wareId) {
					var cartId = $(this).attr('cartId');
					if(!cartId || cartId == 0 || cartId == "0") companyNum(wareId);
					$.post("/cart/del/"+ cartId +".html",  function(data) {
						if(data && data > 0) {
							layer.msg("删除成功！");
							// 重新计算 
							companyNum(wareId);
						} else {
							layer.msg("删除失败！");
						}
					});
				}
			</script>
		</div>
</#macro>